import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'login',
      component: () => import('../views/login.vue')
    },
    {
      path: '/today',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/daytest.vue')
    },
	{
	  path: '/today/list/:id',
	  name: 'daylist',
	  // route level code-splitting
	  // this generates a separate chunk (About.[hash].js) for this route
	  // which is lazy-loaded when the route is visited.
	  component: () => import('../views/daylist.vue')
	},
	{
	  path: '/history/list/:id',
	  name: 'historylist',
	  // route level code-splitting
	  // this generates a separate chunk (About.[hash].js) for this route
	  // which is lazy-loaded when the route is visited.
	  component: () => import('../views/historylist.vue')
	},
	{
	  path: '/history/all',
	  name: 'history-all',
	  // route level code-splitting
	  // this generates a separate chunk (About.[hash].js) for this route
	  // which is lazy-loaded when the route is visited.
	  component: () => import('../views/history.vue')
	},
    {
      path: '/home',
      name: 'home',
      component: () => import('../views/home.vue')
    },
	{
	  path: '/question/list',
	  name: 'questionlist',
	  component: () => import('../views/questionlist.vue')
	},
	{
	  path: '/everycheck',
	  name: 'everycheck',
	  component: () => import('../views/everyput.vue')
	},
	{
	  path: '/top',
	  name: 'top',
	  component: () => import('../views/topone.vue')
	},
	{
	  path: '/wronglist',
	  name: 'wrong',
	  component: () => import('../views/wrong.vue')
	},
	{
	  path: '/question/add/:id',
	  name: 'questionadd',
	  component: () => import('../views/addquestions.vue')
	},
  ]
})

export default router
